<template>
  <page-meta :root-font-size="$rootFontSize"></page-meta>
  <view>
    <view class="mx-4">
      <view class="text-lg font-semibold text-dark leading-10">{{
        article.title
      }}</view>
      <view class="text-xs text-light leading-6">{{ article.createTime }}</view>
      <u-parse class="text-base" :content="article.content"></u-parse>
    </view>
  </view>
</template>

<script>
import { getNoticesById } from '../../services/customer';

export default {
  data() {
    return {
      article: {},
    };
  },
  async onLoad() {
    const { id } = this.$Route.query;
    this._getNoticesById(id);
  },
  methods: {
    async _getNoticesById(noticeId) {
      const { code, data } = await getNoticesById({ noticeId });
      if (code != 200) return;
      this.article = data;
    },
  },
};
</script>

<style></style>
